<p>
	An Iron Condor is an option strategy which involves four option contracts. All options have the same expiration date but different strike prices, where generally the spread in the put strike prices is the same as the spread in the calls. The order of strike for four contracts is A &gt; B &gt; C &gt; D.
</p>
<table class="table qc-table">
<thead>
<tr>
<th> Position</th>
<th>Strike</th>
</tr>
</thead>
<tbody>
<tr>
<td>long 1 OTM put</td>
<td> A</td>
</tr>
<tr>
<td>short 1 OTM put</td>
<td> B</td>
</tr>
<tr>
<td>short 1 OTM call</td>
<td> C</td>
</tr>
<tr>
<td>long 1 OTM call</td>
<td> D</td>
</tr>
</tbody>
</table>
<p>
	The Iron Condor is the combination of a bear put spread and a bull call spread in which the strike price of the long put is lower than the strike price of the long call. If the stock price is between the two short strike prices when the options expire, the strategy will be profitable.
</p>
<div class="section-example-container">

<pre class="python">price = np.arange(700,920,1)
k_call_higher = 850 # the strike price of OTM call(Higher k)
k_call_lower = 820 # the strike price of OTM call(Lower k)
k_put_higher = 780 # the strike price of OTM put(Higher k)
k_put_lower = 750 # the strike price of OTM put(Lower k)
premium_call_higher = 2 # the premium of OTM call(Higher k)
premium_call_lower = 10 # the premium of OTM call(Lower k)
premium_put_higher = 10 # the premium of oTM put(Higher k)
premium_put_lower = 2   # the premium of OTM put(Lower k)
# payoff for the long put position
payoff_long_put = [max(-premium_put_lower, k_put_lower-i-premium_put_lower) for i in price]
# payoff for the short put position
payoff_short_put = [min(premium_put_higher, -(k_put_higher-i-premium_put_higher)) for i in price]
# payoff for the short call position
payoff_short_call = [min(premium_call_lower, -(i-k_call_lower-premium_call_lower)) for i in price]
# payoff for the long call position
payoff_long_call = [max(-premium_call_higher, i-k_call_higher-premium_call_higher) for i in price]
# payoff for Long Iron Condor Strategy
payoff = np.sum([payoff_long_put,payoff_short_put,payoff_short_call,payoff_long_call], axis=0)
plt.figure(figsize=(20,15))
plt.plot(price, payoff_long_put, label = 'Long Put',linestyle='--')
plt.plot(price, payoff_short_put, label = 'Short Put',linestyle='--')
plt.plot(price, payoff_short_call, label = 'Short Call',linestyle='--')
plt.plot(price, payoff_long_call, label = 'Long Call',linestyle='--')
plt.plot(price, payoff, label = 'Long Iron Condor',c='black')
plt.legend(fontsize = 20)
plt.xlabel('Stock Price at Expiry',fontsize = 15)
plt.ylabel('payoff',fontsize = 15)
plt.title('Long Iron Condor Strategy Payoff',fontsize = 20)
plt.grid(True)
</pre>
</div>
<img class="img-responsive" src="https://cdn.quantconnect.com/tutorials/i/Tutorial06-iron-condor.png" alt="iron condor strategy payoff"/>
<p>
	Here the strike price is A (750), B (780), C (820) and D (850). As seen in the payoff plot, the maximum profit comes from the options premium because the deeper OTM options are cheaper than the shallower ones. It is reached when the stock price is between the higher put strike and lower call strike (the two short positions) and the options all expire worthless. The maximum loss of Iron Condor is reached when the stock price is lower than the lowest strike A, then the two call options become worthless, the two puts are in the money. For the other condition, the stock price is higher than the highest strike D. Consequently, the two call options are in the money but the two puts expire worthless.
</p>
